package com.scorpio.appuser.service.impl;

import com.scorpio.appuser.domain.UserEntity;
import com.scorpio.appuser.mapper.UserMapper;
import com.scorpio.appuser.service.UserServer;
import com.scorpio.common.annotation.DataSource;
import com.scorpio.common.enums.DataSourceType;
import com.scorpio.common.service.impl.BaseServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@DataSource(DataSourceType.SLAVE)
public class UserServerImpl extends BaseServiceImpl<UserMapper, UserEntity> implements UserServer {
    @Override
    public UserEntity getLoginUser(String token) {
        return baseDao.selectByToken(token);
    }

    @Override
    public List<UserEntity> nearestList(Long userId, String longitude, String latitude,Integer sex, Integer totality) {
        return baseDao.nearestList(userId,longitude,latitude,sex,totality);
    }
}
